// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

const {ccclass, property} = cc._decorator;

@ccclass
export default class Message {

    // 类型
    MessageType: number;

    // 命令
    Command: number;

    // 参数
    Content: any;

    constructor(type, command, content) {
        this.MessageType = type;
        this.Command = command;
        this.Content = content;
    }

}

export class MessageType {
    // 大类
    static TYPE_UI = 1;
    static TYPE_NPC = 2;
    static TYPE_ENEMY = 3;
    static TYPE_AUDIO = 4;

    // 小类
    static UI_CHANGE_HP = 101;
    static UI_CHANGE_PACKAGE = 102;
}
